<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page files.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name">/_inc/function/files.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">File Functions, Furasta.Org</p>
<p class="description"><p>a number of functions for dealing with files</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Conor Mac Aoidh &lt;<a href="mailto:conormacaoidh@gmail.com">conormacaoidh@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> 1.0</li>
				<li><span class="field">license:</span> <a href="http://furasta.org/licence.txt">The BSD License</a></li>
			</ul>
		
			</div>
</div>
		

	
	
	
	<a name="sec-functions"></a>	
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">	
			<a name="functioncrop_image" id="functioncrop_image"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">crop_image</span> (line <span class="line-number">71</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">crop_image</p>
<p class="description"><p>crops an image to a given width and height. first  runs resize_image without height then crops to  the given height</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			crop_image
		</span>
					(<span class="var-type">GDResource</span>&nbsp;<span class="var-name">$image</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$width</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$height</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$cache</span> = <span class="var-default">false</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">false</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">GDResource</span>
				<span class="var-name">$image</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$width</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$height</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$cache</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$path</span>			</li>
				</ul>
		
	
</div>
<a name="functiondisplay_image" id="functiondisplay_image"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">display_image</span> (line <span class="line-number">26</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">display_image</p>
<p class="description"><p>displays an image from a given path  has support for jpeg, png, gif  can resize an image if height is given,  will also cache resized images. only  outputs in png format</p></p>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			display_image
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$path</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">false</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$height</span> = <span class="var-default">false</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$path</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$width</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$height</span>			</li>
				</ul>
		
	
</div>
<a name="functiondownload_file" id="functiondownload_file"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">download_file</span> (line <span class="line-number">188</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">download_file</p>
<p class="description"><p>sends a given file to the user</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			download_file
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span> = <span class="var-default">false</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: optional</span>			</li>
				</ul>
		
	
</div>
<a name="functionresize_dimensions" id="functionresize_dimensions"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">resize_dimensions</span> (line <span class="line-number">164</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">resize_dimensions</p>
<p class="description"><p>calculates the new dimensions of an image, given  target width, height and original width, height.</p></p>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			resize_dimensions
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$width</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$height</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$old_width</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$old_height</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$width</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$height</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$old_width</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$old_height</span>			</li>
				</ul>
		
	
</div>
<a name="functionresize_image" id="functionresize_image"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">resize_image</span> (line <span class="line-number">131</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">resize_image</p>
<p class="description"><p>resizes images to a given width and height. if  width is omitted height will be auto calculated  caching is also performed if cache is set to  true</p></p>
	
	<div class="method-signature">
		<span class="method-result">GDResource</span>
		<span class="method-name">
			resize_image
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$image</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$width</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$height</span> = <span class="var-default">false</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$cache</span> = <span class="var-default">false</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">false</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$image</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$width</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$height</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$cache</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$path</span>			</li>
				</ul>
		
	
</div>
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Thu, 07 Jun 2012 18:22:47 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>